<?php

/**
 * Tickets form base class.
 *
 * @package    tvpv
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseTicketsForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'       => new sfWidgetFormInputHidden(),
      'ticketid' => new sfWidgetFormInput(),
      'person'   => new sfWidgetFormPropelChoice(array('model' => 'People', 'add_empty' => false)),
      'customer' => new sfWidgetFormPropelChoice(array('model' => 'Customers', 'add_empty' => true)),
      'status'   => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'       => new sfValidatorPropelChoice(array('model' => 'Receipts', 'column' => 'id', 'required' => false)),
      'ticketid' => new sfValidatorInteger(),
      'person'   => new sfValidatorPropelChoice(array('model' => 'People', 'column' => 'id')),
      'customer' => new sfValidatorPropelChoice(array('model' => 'Customers', 'column' => 'id', 'required' => false)),
      'status'   => new sfValidatorInteger(),
    ));

    $this->widgetSchema->setNameFormat('tickets[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Tickets';
  }


}
